import request from '@/utils/request'

// 查询营地营位功能列表
export function listCampsite(query) {
  return request({
    url: '/camp/campsite/list',
    method: 'get',
    params: query
  })
}

// 查询营地营位功能详细
export function getCampsite(campsiteId) {
  return request({
    url: '/camp/campsite/' + campsiteId,
    method: 'get'
  })
}

// 新增营地营位功能
export function addCampsite(data) {
  return request({
    url: '/camp/campsite',
    method: 'post',
    data: data
  })
}

// 修改营地营位功能
export function updateCampsite(data) {
  return request({
    url: '/camp/campsite',
    method: 'put',
    data: data
  })
}

// 删除营地营位功能
export function delCampsite(campsiteId) {
  return request({
    url: '/camp/campsite/' + campsiteId,
    method: 'delete'
  })
}
